﻿
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/eqp/eqpList" method="post">
        <div class="bjui-searchBar">
            <label>设备名称：</label>
            <input name="EQUIPMENT_ID" value="${EQUIPMENT_ID}"/>
            <label>设备位置：</label>
            <input name="LOCATION" value="${LOCATION}"/>
            <label>设备状态：</label>
            <input name="SUB_STATE" value="${SUB_STATE}"/>
            <g:hiddenField name="SYS_QUERY_NAME" value="eqpList" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/eqp/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出Excel文件</button>&nbsp;

        </div>
    </form>
</div>
<div class="bjui-pageContent">

        <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr>
                <th width="80">NO.</th>
                <th width="80">设备名称</th>
                <th width="80">设备描述</th>
                <th width="110">设备类型</th>
                <th width="110">设备状态</th>
                <th width="110">设备位置</th>
                <th width="110">最后操作时间</th>
                <th width="80">最后操作人</th>
                <th width="80">持续时间(H)</th>
            </tr>
            </thead>
            <tbody>
            <g:each in="${eqpList}" status="i" var="tableInstance">
                <tr>
                    <td width="60">${i+1}</td>
                    <td width="80">${tableInstance.Equipment_Id}</td>
                    <td width="80">${tableInstance.eqp_desc}</td>

                    <td width="80">${tableInstance.EQP_TYPE}</td>
                    <td width="80" style="background-color:
                        <g:if test="${tableInstance.SUB_STATE=="RUN"}">
                            #00FF00
                        </g:if>
                        <g:elseif test="${tableInstance.SUB_STATE=="DOWN"}">
                            #FF0000
                        </g:elseif>
                    <g:elseif test="${tableInstance.SUB_STATE=="IDLE"}">
                        #ffd700
                    </g:elseif>
                    <g:else>
                        #FFFFFF
                    </g:else>

                    ">${tableInstance.SUB_STATE}</td>
                    <td width="80">${tableInstance.LOCATION}</td>
                    <td width="80">${tableInstance.UPDATED}</td>
                    <td width="110">${tableInstance.UPDATED_BY}</td>
                    <td width="110">${tableInstance.DURATION}</td>
                </tr>
            </g:each>

            </tbody>
        </table>

</div>


<script type="text/javascript">
    $(function () {
        $.CurrentNavtab.find('#start-date-input,#end-date-input').datetimepicker({
            format:'yyyy-mm-dd hh',
            autoclose: true,
            todayBtn: true,
            startView:1,
            minView:1,
            pickerPosition: "bottom-left",
            language:'zh-CN',
            startDate:'2016-01-01'
        });

        $.CurrentNavtab.find('.selectpicker').selectpicker();
    })
</script>